 package org.mybatis.core.jdbc;
 
 import java.io.IOException;
 
 public class SafeAppendable
 {
   private Appendable a;
   private boolean empty = true;
 
   public SafeAppendable(Appendable a)
   {
     this.a = a;
   }
 
   public SafeAppendable append(CharSequence s) {
     try {
       if ((this.empty) && (s.length() > 0)) this.empty = false;
       this.a.append(s);
     } catch (IOException e) {
       throw new RuntimeException(e);
     }
     return this;
   }
 
   public boolean isEmpty() {
     return this.empty;
   }
 
   public String toString() {
     return this.a.toString();
   }
 }

